/********************************************
@FileType		:	JavaScript
@Filename		:	comm.js
@Version		:	0.0.1
@QQ				:	50980487
@Author			:	meihangbo@126.com
@Update			:	2010年10月30日
@Content		: JavaScript by Editplus
********************************************/
function $$ (_id) {return document.getElementById(_id);}
function debug (_o) {
	for (var i in _o) {
		alert(_o[i]);
		$$('debug').innerHTML += i + _o[i] + '<br />';
	}
}
function selectNav (obj,showNum) {
	if (obj.className.indexOf('nav_select') < 0) {
		var navlis = $$("nav").getElementsByTagName("li");
		for (var i=0; i<navlis.length; i++) {
			if (navlis[i].className.indexOf('nav_text') > -1) {
				navlis[i].className = navlis[i].className.replace('nav_select','');
			}
		}
		var contdivs = $$("content").getElementsByTagName("div");
		for (var i=0; i<contdivs.length; i++) {
			if (contdivs[i].className.indexOf('cont') > -1) {
				contdivs[i].className = 'cont';
			}
		}
		obj.className += ' nav_select';
		$$("c"+showNum).className += ' contShow';
	}
}
function selectNav1 (obj,showNum) {
	if (obj.className.indexOf('c1al_nav_select') < 0) {
		var navlis = $$("c1al_newsNav").getElementsByTagName("li");
		for (var i=0; i<navlis.length; i++) {
			if (navlis[i].className.indexOf('c1al_nav_text') > -1) {
				navlis[i].className = navlis[i].className.replace('c1al_nav_select','');
			}
		}
		var contdivs = $$("c1al_navs").getElementsByTagName("div");
		for (var i=0; i<contdivs.length; i++) {
			if (contdivs[i].className.indexOf('c1al_nav') > -1) {
				contdivs[i].className = 'c1al_nav';
			}
		}
		obj.className += ' c1al_nav_select';
		$$("c1al_nav"+showNum).className += ' c1al_nav_show';
	}
}
window.onload = function () {
	var allA = document.getElementsByTagName('a');
	for (var i=0; i<allA.length; i++) {
		allA[i].hideFocus = true;
	}
}